<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template('member','header'); ?>
<script type="text/javascript" src="images/js/validator.js"></script>
<div id="main">
  <?php include template('order' , 'left'); ?>
  <div id="right">
    <p id="position"> <strong>当前位置：</strong><a href="<?php echo $MODULE['member']['url'];?>">会员中心</a><a href="<?php echo $M['url'];?>">订单</a>确认订单</p>
<form action="<?php echo $M['url'];?>order.php?action=add" method="post">
    <input type="hidden" name="forward" value="<?php echo $forward;?>" />
    <input type="hidden" name="goodsid" value="<?php echo $goodsid;?>" />
    <input type="hidden" name="goodsname" value="<?php echo $goodsname;?>" />
    <input type="hidden" name="goodsurl" value="<?php echo $goodsurl;?>" />
    <input type="hidden" name="price" value="<?php echo $price;?>" />
    <input type="hidden" name="unit" value="<?php echo $unit;?>" />
    <input type="hidden" name="carriage" value="<?php echo $carriage;?>" />
<input type="hidden" name="stock" value="<?php echo $stock;?>" />
    <input type="hidden" name="verify" value="<?php echo $verify;?>" />
    <input type="hidden" name="number" value="<?php echo $number;?>" />
    <input type="hidden" name="note" value="<?php echo $note;?>" />
    <input type="hidden" name="isnewdeliver" value="<?php echo $isnewdeliver;?>" />

    <input type="hidden" value="<?php echo $d['areaid'];?>" name="d[areaid]" />
    <input type="hidden" value="<?php echo $d['consignee'];?>" name="d[consignee]" />
    <input type="hidden" value="<?php echo $d['telephone'];?>" name="d[telephone]" />
    <input type="hidden" value="<?php echo $d['mobile'];?>" name="d[mobile]" />
    <input type="hidden" value="<?php echo $d['address'];?>" name="d[address]" />
    <input type="hidden" value="<?php echo $d['postcode'];?>" name="d[postcode]" />
    <table cellpadding="0" cellspacing="1" class="table_form">
      <caption>订单信息</caption>
  <tr>
        <th style="width:20%">产品ID：</th>
        <td><?php echo $goodsid;?></td>       
      </tr>
  <tr>
        <th>产品名称：</th>
        <td><a href="<?php echo $goodsurl;?>" target="_blank"><?php echo $goodsname;?></a></td>       
      </tr>
<?php if($carriage) { ?>
  <tr>
        <th>产品运费：</th>
        <td>￥<?php echo $carriage;?>元</td>       
      </tr>
<?php } ?>
      <tr>
        <th>产品单价：</th>
        <td style="color:red">￥<?php echo $price;?>元/<?php echo $unit;?></td>       
      </tr>
      <tr>
        <th>订购数量：</th>
        <td style="color:red"><?php echo $number;?> <?php echo $unit;?></td>       
      </tr>
      <tr>
        <th>合计：</th>
        <td style="color:red">￥<?php echo $amount;?>元</td>       
      </tr>
      <tr>
        <th>给卖家留言：</th>
        <td><?php echo $note;?></td>       
      </tr>
    </table>
    <table cellpadding="0" cellspacing="1" class="table_form">
      <caption>收货信息</caption>
    <tbody id="newdeliver">
  <tr>
        <th style="width:20%">配送区域：</th>
        <td><?php echo $AREA[$d['areaid']]['name'];?></td>       
      </tr>
      <tr>
        <th>收货人姓名：</th>
        <td><?php echo $d['consignee'];?></td>       
      </tr>
  <tr>
        <th>固定电话：</th>
        <td><?php echo $d['telephone'];?></td>     
      </tr>
  <tr>
        <th>移动电话：</th>
        <td><?php echo $d['mobile'];?></td>       
      </tr>
  <tr>
        <th>收货地址：</th>
        <td><?php echo $d['address'];?></td>       
      </tr>
      <tr>
        <th>邮编：</th>
        <td><?php echo $d['postcode'];?></td>       
      </tr>
       <tr>
        <th>验证码：</th>
        <td><?php echo form::checkcode('checkcodestr', 6, ' require="true" datatype="require" msg="请输入验证码" msgid="msg_checkcode"');?><span id="msg_checkcode"></span></td>       
      </tr>
      <tr>
        <th> </th>
        <td><input type="submit" name="dosubmit" value=" 确认订单 " /> &nbsp;&nbsp;<input type="button" onclick="history.back(-1)" value=" 返回 " /> </td>       
      </tr>
    </table></form>	
  </div>
</div>
<div class="clear"></div>
<?php include template('member','footer'); ?>
<script language="javascript" type="text/javascript">
$().ready(function() {
  $('form').checkForm(1);
});
</script>